#ifndef hal_temp_H
#define hal_temp_H

#include <stdint.h>

// 区分从温控芯片采集到的电压转换为温度还是温控电流
enum
{
    AD7689_LASER_TEMP_REGTOT = 1,
    AD7689_LASER_TEMPCTRCUR_REGTOT,
		AD7689_LASER_PDPOWER_REGTOT
};

void hal_TempInit();

void hal_TemptSlowChange(float target_temperature, int lasernum, uint8_t AD7689INX);

void hal_TemptDirectChange(float temp, int laserNumber);

uint16_t hal_DAC8830SpiTempTToReg(float temp_real);

float hal_ADC7689TempRegtoT(uint16_t temp_V);

float hal_ADC7689TemptCtrCurRegToI(uint16_t tempctrcur);

float hal_ADC7689PDPowerRegToI(uint16_t temp_V);

#endif